"""
__author__="yanwei"
__describe__="统一登录平台登录测试用例"
"""

from Pages.BasePage import Base_Page
from Pages.unify_login_page import UnifyLoginPage
from Config.readconfig import ReadConfig
from Drivers.browser_driver import BrowserDriver
import time
import unittest


class TestUnifyLogin(unittest.TestCase):

    def setUp(self):
        self.url = ReadConfig().get_url("test_unify_http_url")
        self.driver = BrowserDriver().browser_chrome(self.url)
        self.login = UnifyLoginPage()
        self.account = ReadConfig().get_account("account")
        self.password = ReadConfig().get_account("password")
        self.ver_code = ReadConfig().get_account("ver_code")

    def tearDown(self):
        self.driver.quit()

    def unify_login_test(self):
        '''成功登录统一登录平台'''
        self.url = ReadConfig().get_url("test_unify_http_url")
        self.driver = BrowserDriver().browser_chrome(self.url)
        self.login.account(self.driver,self.account)
        self.login.password(self.driver,self.password)
        self.login.get_ver_code(self.driver)
        self.login.input_ver_code(self.driver,self.ver_code)

if __name__=="__main__":
    TestUnifyLogin().unify_login_test()




